package com.cy.detectsys.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName proxynode_resource
 */
@TableName(value ="proxynode_resource")
@Data
public class ProxynodeResource implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String taskProxynodeUser;

    /**
     * 
     */
    private String taskProxynodePassword;

    /**
     * 
     */
    @JSONField(name = "taskProxynodeIp")
    private String taskProxynodeIpIn;

    /**
     * 
     */
    private String taskProxynodePort;

    /**
     * 
     */
    private String createUser;

    /**
     * 
     */
    private Date updateDate;

    /**
     * 
     */
    @TableLogic
    private Boolean deleted;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private String updateUser;

    /**
     * 
     */
    private String taskProxynodeStatusType;

    /**
     * 
     */
    private String remark;

    /**
     * 
     */
    private Date endTime;

    /**
     * 
     */
    private String taskProxynodeIpOut;

    /**
     * 新增字段，入归属地
     */
    private String taskProxynodeAttributeIn;

    /**
     * 出归属地
     */
    private String taskProxynodeAttributeOut;

    /**
     * 
     */
    private String taskProxynodeEncryptionId;

    @TableField(exist = false)
    private String taskProxynodeEncryption =  "chacha20-ietf-poly1305";

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProxynodeResource other = (ProxynodeResource) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskProxynodeUser() == null ? other.getTaskProxynodeUser() == null : this.getTaskProxynodeUser().equals(other.getTaskProxynodeUser()))
            && (this.getTaskProxynodePassword() == null ? other.getTaskProxynodePassword() == null : this.getTaskProxynodePassword().equals(other.getTaskProxynodePassword()))
            && (this.getTaskProxynodeIpIn() == null ? other.getTaskProxynodeIpIn() == null : this.getTaskProxynodeIpIn().equals(other.getTaskProxynodeIpIn()))
            && (this.getTaskProxynodePort() == null ? other.getTaskProxynodePort() == null : this.getTaskProxynodePort().equals(other.getTaskProxynodePort()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateUser() == null ? other.getUpdateUser() == null : this.getUpdateUser().equals(other.getUpdateUser()))
            && (this.getTaskProxynodeStatusType() == null ? other.getTaskProxynodeStatusType() == null : this.getTaskProxynodeStatusType().equals(other.getTaskProxynodeStatusType()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getTaskProxynodeIpOut() == null ? other.getTaskProxynodeIpOut() == null : this.getTaskProxynodeIpOut().equals(other.getTaskProxynodeIpOut()))
            && (this.getTaskProxynodeAttributeIn() == null ? other.getTaskProxynodeAttributeIn() == null : this.getTaskProxynodeAttributeIn().equals(other.getTaskProxynodeAttributeIn()))
            && (this.getTaskProxynodeAttributeOut() == null ? other.getTaskProxynodeAttributeOut() == null : this.getTaskProxynodeAttributeOut().equals(other.getTaskProxynodeAttributeOut()))
            && (this.getTaskProxynodeEncryptionId() == null ? other.getTaskProxynodeEncryptionId() == null : this.getTaskProxynodeEncryptionId().equals(other.getTaskProxynodeEncryptionId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskProxynodeUser() == null) ? 0 : getTaskProxynodeUser().hashCode());
        result = prime * result + ((getTaskProxynodePassword() == null) ? 0 : getTaskProxynodePassword().hashCode());
        result = prime * result + ((getTaskProxynodeIpIn() == null) ? 0 : getTaskProxynodeIpIn().hashCode());
        result = prime * result + ((getTaskProxynodePort() == null) ? 0 : getTaskProxynodePort().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateUser() == null) ? 0 : getUpdateUser().hashCode());
        result = prime * result + ((getTaskProxynodeStatusType() == null) ? 0 : getTaskProxynodeStatusType().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getTaskProxynodeIpOut() == null) ? 0 : getTaskProxynodeIpOut().hashCode());
        result = prime * result + ((getTaskProxynodeAttributeIn() == null) ? 0 : getTaskProxynodeAttributeIn().hashCode());
        result = prime * result + ((getTaskProxynodeAttributeOut() == null) ? 0 : getTaskProxynodeAttributeOut().hashCode());
        result = prime * result + ((getTaskProxynodeEncryptionId() == null) ? 0 : getTaskProxynodeEncryptionId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskProxynodeUser=").append(taskProxynodeUser);
        sb.append(", taskProxynodePassword=").append(taskProxynodePassword);
        sb.append(", taskProxynodeIpIn=").append(taskProxynodeIpIn);
        sb.append(", taskProxynodePort=").append(taskProxynodePort);
        sb.append(", createUser=").append(createUser);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateUser=").append(updateUser);
        sb.append(", taskProxynodeStatusType=").append(taskProxynodeStatusType);
        sb.append(", remark=").append(remark);
        sb.append(", endTime=").append(endTime);
        sb.append(", taskProxynodeIpOut=").append(taskProxynodeIpOut);
        sb.append(", taskProxynodeAttributeIn=").append(taskProxynodeAttributeIn);
        sb.append(", taskProxynodeAttributeOut=").append(taskProxynodeAttributeOut);
        sb.append(", taskProxynodeEncryptionId=").append(taskProxynodeEncryptionId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}